//
//  RegisterVC.m
//  CFAspace
//
//  Created by 徐凯 on 16/6/15.
//  Copyright © 2016年 Xukai. All rights reserved.
//

#import "RegisterVC.h"

@interface RegisterVC ()<UITextFieldDelegate>

@property (weak, nonatomic) IBOutlet UITextField *userNameFileld;
@property (weak, nonatomic) IBOutlet UITextField *nameFileld;
@property (weak, nonatomic) IBOutlet UITextField *emailFiled;
@property (weak, nonatomic) IBOutlet UITextField *passwordFiled;
@property (weak, nonatomic) IBOutlet UITextField *passwordAgainFiled;


@end

@implementation RegisterVC

- (void)viewDidLoad {
    [super viewDidLoad];

}


- (IBAction)backClick:(id)sender {
    
    [self dismissViewControllerAnimated:YES completion:nil];
}

- (IBAction)sureClick:(id)sender {
    if (self.userNameFileld.text.length == 0) {
        [SVProgressHUD showErrorWithStatus:@"请填写用户名"];
        return;
    }else if (self.nameFileld.text.length == 0) {
        [SVProgressHUD showErrorWithStatus:@"请填写姓名"];
        return;
    }else if (self.emailFiled.text.length == 0){
        [SVProgressHUD showErrorWithStatus:@"请填写邮箱"];
        return;
    }else if (self.passwordFiled.text.length == 0){
        [SVProgressHUD showErrorWithStatus:@"请填写密码"];
        return;
        
    }else if (self.passwordAgainFiled.text.length == 0){
        [SVProgressHUD showErrorWithStatus:@"请再次输入密码"];
        return;
    }
    
    if(![self.passwordFiled.text isEqualToString:self.passwordAgainFiled.text])
    {
        [SVProgressHUD showErrorWithStatus:@"两次密码不一致"];
        return;
    }
    
   
}

@end
